using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace 第四章
{
    public partial class _4__6 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string[,] problem = {
            {"问题1","答案1","答案2","答案3","答案4" },
            {"问题2","答案1","答案2","答案3","答案4" },
            {"问题3","答案1","答案2","答案3","答案4" },
            {"问题4","答案1","答案2","答案3","答案4" },
            {"问题5","答案1","答案2","答案3","答案4" },
            {"问题6","答案1","答案2","答案3","答案4" },
            {"问题7","答案1","答案2","答案3","答案4" },
            {"问题8","答案1","答案2","答案3","答案4" },
            {"问题9","答案1","答案2","答案3","答案4" },
            {"问题10","答案1","答案2","答案3","答案4" },
            };

            for (int i = 0; i < problem.GetLength(0); i++)
            {
                Label labTitle = new Label();
                labTitle.Text = problem[i, 0] + "<br/>";
                ph1.Controls.Add(labTitle);
                for (int j = 1; j < problem.GetLength(1); j++)
                {
                    RadioButton radio = new RadioButton();
                    radio.Text = problem[i, j] + "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp";
                    radio.GroupName = problem[i, 0];
                    ph1.Controls.Add(radio);
                }
                ph1.Controls.Add(new Literal { Text = "<br/><br/>" });
            }
            Button button = new Button();
            button.Text = "交卷";
            button.ID = "btnSubmit";
            ph1.Controls.Add(button);
        }
    }
}